<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateClassesTable extends Migration {

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up() {
        Schema::create('classes', function(Blueprint $table) {
                $table->increments('id');
                $table->string('course');
                $table->string('team');
                $table->string('level');
                $table->string('crew');
                $table->text('location');
                $table->text('note');
                $table->char('updater', 5);
                $table->timestamps();
                $table->unique(array ( 'course', 'team', 'level', 'crew' ));
            });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down() {
        Schema::drop('classes');
    }

}
